﻿using Microsoft.Xna.Framework;

namespace Ultima.Xna.Graphics
{
    public class CameraManager : DrawableGameComponent, ICameraService
    {
        ICamera _currentCamera;

        public ICamera CurrentCamera
        {
            get { return _currentCamera; }
            set { _currentCamera = value; }
        }

        public CameraManager(Game game)
            : base(game)
        {

        }

        public override void Draw(GameTime gameTime)
        {
            if (_currentCamera != null)
                _currentCamera.Update(gameTime);

            base.Draw(gameTime);
        }
    }
}
